<template>
    <div class="index">
		        <div class="index" v-for="(item, index) in banners" :key="index" align="center" >
    				<img :src="item" style="margin-top:90px">
				</div>
		     <hr style='margin-bottom:30px'>
		     <div style="margin-top:30px">
				 <p>{{this.data6[0].title}}</p>
			</div>   
			 <hr style='margin-top:10px'>
		     <div class="operation" style='margin-top:30px'>
				 <p>{{this.data6[0].position}}</p>
		    </div>
		     <hr style='margin-top:10px'>
		       <div class="operation" style='margin-top:30px'>
				 <p>{{this.data6[0].treatment}}</p>
		    </div>
		    <hr style='margin-top:10px'>
    </div>

</template> 
<script>
    /* eslint-disable space-before-function-paren */
    import baidu from '../../../images/baidu.jpg.png';
    import jingdong from '../../../images/jingdong.jpg';
    import {exam} from '../../../../api/index.js';

    export default {
        data () {
            return {
                id: '',
                banners: [],
                data6: []
            };
        },
        methods: {
        },
        mounted() {
            var _this = this;
            console.log('id=====》'+ this.$route.params.id);
            if (this.$route.params.id === 1) {
                this.banners.push(baidu);
                console.log(this.banners);
            } else if (this.$route.params.id === 2) {
                this.banners.push(jingdong);
            } else if (this.$route.params.id === 3) {
                this.banners.push(baidu);
            } else if (this.$route.params.id === 4) {
                this.banners.push(jingdong);
            } else if (this.$route.params.id === 5) {
                this.banners.push(baidu);
            }
            exam.jobFindByid_post({data: {id: this.$route.params.id}}).then((res) => {
                for (var i in res.data.data.collectinfo) {
                    _this.data6.push(res.data.data.collectinfo[i]);
                    console.log(res.data.data.collectinfo[i].title);
                }
            }, function (error) {
                console.log(error);
            });
        }
};
</script>

